package {
	
	import app.Slide;
	import flash.display.MovieClip;
	import flash.display.StageAlign;
	import flash.display.StageScaleMode;
	import flash.events.Event;
	
	/**
	 * @author hungconcon
	 */
	[SWF(backgroundColor="#FFFFFF",frameRate="24",width="600",height="450")]
	public class Main extends MovieClip {
		
		private var slide:Slide;
		
		public function Main():void {
			addEventListener(Event.ADDED_TO_STAGE, init);
		}
		
		private function init(e:Event = null):void {
			removeEventListener(Event.ADDED_TO_STAGE, init);
			stage.addEventListener(Event.ENTER_FRAME, loadApp);
		}
		
		private function loadApp(evt:Event = null):void {
			if (stage.loaderInfo.bytesLoaded == stage.loaderInfo.bytesTotal) {
				stage.removeEventListener(Event.ENTER_FRAME, loadApp);
				
				slide = new Slide();
				slide.x = 0;
				slide.y = 0;
				
				addChild(slide);
				
			}
		}
	
	}
}